package com.fingard.dsp.bank.reqrespobj.batchbill;

import com.fingard.dsp.bank.reqrespobj.ReqRespHeader;
import com.fingard.dsp.bank.reqrespobj.RetAtsBase;
import com.fingard.dsp.bank.reqrespobj.batchbill.detail.RetAtsBatchInfoQryDetail;
import com.fingard.xml.XmlTextWriter;

/**
 * Created by F on 2019/10/20.
 */
public class RetAtsBatchInfoQry extends RetAtsBase {
    public String respCode;
    public String respInfo;


    public RetAtsBatchInfoQry(ReqRespHeader p_header) {
        retHeader = p_header;
        retXmlWriter = new XmlTextWriter();//用于输出返回ATS的XML报文
    }


    public void writeBefore() {
        writeStart();//写返回ATS的统一头部信息
        retXmlWriter.writeElementString("RespCode", respCode);
        retXmlWriter.writeElementString("RespInfo", respInfo);
    }

    public void writeAfter() {
        writeEnd();
    }

    public void writeDetail(RetAtsBatchInfoQryDetail detail) {
        retXmlWriter.writeStartElement("DetailRecord");
        retXmlWriter.writeElementString("BillNo", detail.billNo);
        retXmlWriter.writeElementString("BillId", detail.billId);
        retXmlWriter.writeElementString("BillCecmNo", detail.billCecmNo);
        retXmlWriter.writeElementString("BillType", detail.billType);
        retXmlWriter.writeElementString("AccpDate", detail.accpDate);
        retXmlWriter.writeElementString("DueDate", detail.dueDate);
        retXmlWriter.writeElementString("IssDate", detail.issDate);
        retXmlWriter.writeElementString("BillAmt", detail.billAmt);
        retXmlWriter.writeElementString("DrawName", detail.drawName);
        retXmlWriter.writeElementString("DrawAct", detail.drawAct);
        retXmlWriter.writeElementString("DrawBnkName", detail.drawBnkName);
        retXmlWriter.writeElementString("DrawBnkCode", detail.drawBnkCode);
        retXmlWriter.writeElementString("PayeeName", detail.payeeName);
        retXmlWriter.writeElementString("PayeeAct", detail.payeeAct);
        retXmlWriter.writeElementString("PayeeBnkName", detail.payeeBnkName);
        retXmlWriter.writeElementString("PayeeBnkCode", detail.payeeBnkCode);
        retXmlWriter.writeElementString("PayeeBranch", detail.payeeBranch);
        retXmlWriter.writeElementString("AccpName", detail.accpName);
        retXmlWriter.writeElementString("AccpAct", detail.accpAct);
        retXmlWriter.writeElementString("AccpBnkName", detail.accpBnkName);
        retXmlWriter.writeElementString("AccpBnkCode", detail.accpBnkCode);
        retXmlWriter.writeElementString("ContractNo", detail.contractNo);
        retXmlWriter.writeElementString("TransFlag", detail.transFlag);
        retXmlWriter.writeElementString("BillStatus", detail.billStatus);
        retXmlWriter.writeElementString("Reserved1", detail.reserved1);
        retXmlWriter.writeElementString("Reserved2", detail.reserved2);
        retXmlWriter.writeEndElement();
    }

}
